function getDetailsList (params) {
  return $axios({
    url: '/details/page',
    method: 'get',
    params
  })
}
function getPromiseList (params) {
  return $axios({
    url: '/details/pageR',
    method: 'get',
    params
  })
}
// 获取图书类型下拉框
function getType(){
  return $axios({
    url: '/book/getType',
    method: 'get',
  })
}

// 修改---启用禁用接口
function enableOrDisableEmployee (params) {
  return $axios({
    url: '/book',
    method: 'put',
    data: { ...params }
  })
}

// 新增---添加图书
function addBook (params) {
  return $axios({
    url: '/book',
    method: 'post',
    data: { ...params }
  })
}

// 删除当前列的接口
const joinBook = (ids) => {
  return $axios({
    url: '/details',
    method: 'delete',
    params: { ids }
  })
}

const delBook = (ids) => {
  return $axios({
    url: '/details/return',
    method: 'delete',
    params: { ids }
  })
}

// 归还图书
function returnBook (id) {
  return $axios({
    url: `/book/returnBook/${id}`,
    method: 'get',
  })
}


// 修改图书
function editBook (params) {
  return $axios({
    url: '/book',
    method: 'put',
    data: { ...params }
  })
}


// 修改页面反查详情接口
function queryBookById (id) {
  console.log('!!!!!!!!!!++',id)
  return $axios({
    url: `/book/${id}`,
    method: 'get'
  })
}

function sign (location) {
  console.log('!!!!!!!!!!++',location)
  return $axios({
    url: `/sign/${location}`,
    method: 'get'
  })
}

function getSignDate(){
  return $axios({
    url: '/sign',
    method: 'get'
  })
}
